<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->
<title>nl_langinfo</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4><a name = "tag_000_007_901">&nbsp;</a>NAME</h4><blockquote>
nl_langinfo - language information
</blockquote><h4><a name = "tag_000_007_902">&nbsp;</a>SYNOPSIS</h4><blockquote>
<pre><code>

#include &lt;<a href="langinfo.h.html">langinfo.h</a>&gt;

char *nl_langinfo(nl_item <i>item</i>);
</code>
</pre>
</blockquote><h4><a name = "tag_000_007_903">&nbsp;</a>DESCRIPTION</h4><blockquote>
The
<i>nl_langinfo()</i>
function
returns a pointer to a string
containing information relevant to the particular
language or cultural area defined in the program's locale
(see
<i><a href="langinfo.h.html">&lt;langinfo.h&gt;</a></i>).
The manifest constant names and values of
<i>item</i>
are defined in
<i><a href="langinfo.h.html">&lt;langinfo.h&gt;</a></i>.
For example:
<pre>
<code>
nl_langinfo (ABDAY_1)
</code>
</pre>
<p>
would return a pointer to the string &quot;Dom&quot; if the identified
language was Portuguese, and &quot;Sun&quot; if the identified language
was English.
<p>
Calls to
<i><a href="setlocale.html">setlocale()</a></i>
with a category corresponding to the category of
<i>item</i>
(see
<i><a href="langinfo.h.html">&lt;langinfo.h&gt;</a></i>),
or to the category LC_ALL, may
overwrite the array pointed to by the return value.
<p>
This interface need not be reentrant.
</blockquote><h4><a name = "tag_000_007_904">&nbsp;</a>RETURN VALUE</h4><blockquote>
In a locale where
<i>langinfo</i>
data is not defined,
<i>nl_langinfo()</i>
returns a pointer to the corresponding string in the POSIX locale.
In all locales,
<i>nl_langinfo()</i>
returns a pointer to an empty string if
<i>item</i>
contains an invalid setting.
<p>
This pointer may point to static data that may be overwritten on the
next call.
</blockquote><h4><a name = "tag_000_007_905">&nbsp;</a>ERRORS</h4><blockquote>
No errors are defined.
</blockquote><h4><a name = "tag_000_007_906">&nbsp;</a>EXAMPLES</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_007_907">&nbsp;</a>APPLICATION USAGE</h4><blockquote>
The array pointed to by the return value should not be modified
by the program, but may be modified by further calls to
<i>nl_langinfo()</i>.
</blockquote><h4><a name = "tag_000_007_908">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_007_909">&nbsp;</a>SEE ALSO</h4><blockquote>
<i><a href="setlocale.html">setlocale()</a></i>,
<i><a href="langinfo.h.html">&lt;langinfo.h&gt;</a></i>,
<i><a href="nl_types.h.html">&lt;nl_types.h&gt;</a></i>,
the <b>XBD</b> specification, <a href="../xbd/locale.html"><b>Locale</b>&nbsp;</a>.
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>
